using System.Data.SqlClient;

namespace PropertyExpression.ControllableQuery.Test2
{
    public static class SqlCommandExtensions
    {
        public static SqlParameter AddParameter(this SqlCommand it, string parameterName, object value)
        {
            return it.Parameters.AddWithValue(parameterName, value);
        }

        public static SqlParameter AddParameter(this SqlCommand it, string parameterName, string value)
        {
            return it.Parameters.Add(new SqlParameter(parameterName, value) {Size = -1});
        }
    }
}